package com.boot.unity.api.wx.controller;


import com.boot.unity.api.wx.entity.TrainSuggestion;
import com.boot.unity.api.wx.service.TrainSuggestionService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 意见箱
 */
@RestController
@RequestMapping("/wx/suggestion")
@Validated
public class WxSuggestionController {
    private final Log logger = LogFactory.getLog(WxSuggestionController.class);
    @Autowired
    private TrainSuggestionService trainSuggestionService;


    @GetMapping("queryCoachMonthSugg")
    public Object queryCoachMonthSugg(String month){
        return trainSuggestionService.queryCoachMonthSugg(month);
    }

    @GetMapping("getWxBindCoach")
    public Object getWxBindCoach(String uid,String key){
        return trainSuggestionService.getWxBindCoach(uid,key);

    }
    /**
     * 意见箱信息保存
     *
     * @param
     * @param suggestion
     * @return
     */
    @PostMapping("save")
    public Object save(@RequestBody TrainSuggestion suggestion) {
        return trainSuggestionService.save(suggestion);

    }

    @GetMapping("checkUser")
    public Object checkUser(String uid,String key){
        return trainSuggestionService.checkUser(uid,key);

    }



}
